﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="ThreadList.aspx.cs" Inherits="App.ThreadList" Theme="Alpha"  %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="Panel1" runat="server">
        <h1 class="detailNick">
            <span><asp:LinkButton ID="LinkButtonTeamInfo" runat="server" OnClick="LinkButtonTeamInfo_Click"></asp:LinkButton></span>
        </h1>
        <ajaxToolkit:Gravatar ID="ImageAvatar" runat="server" DefaultImageBehavior="Identicon" CssClass="detailAvatar" />

        <asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click" CssClass="backLink">o úroveň výše</asp:LinkButton>
        
        <asp:Label ID="txtLabel" runat="server" CssClass="detailStats"></asp:Label>
                
        <div class="newItemForm">
            <asp:Panel ID="Panel2" runat="server">
                <div class="formField">
                    <asp:Label ID="Label2" runat="server" Text="Název tématu:"></asp:Label>
                    <asp:TextBox ID="TextBoxNewTitle" runat="server" Columns="55" MaxLength="240" ValidationGroup="ThreadValidation"></asp:TextBox>
                </div>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator" runat="server" ControlToValidate="TextBoxNewTitle" ErrorMessage="Název tématu musí být uveden" ValidationGroup="ThreadValidation"/>
                <div class="formButton">
                    <asp:Button ID="ButtonNewTopic" runat="server" Text="Vytvořit" onclick="ButtonNewTopic_Click" ValidationGroup="ThreadValidation" />
                </div>
            </asp:Panel>
            <ajaxToolkit:CollapsiblePanelExtender ID="collapsiblePanelExtender" runat="server" TargetControlID="Panel2" Collapsed="true" CollapsedText="Vložit nové téma" ExpandedText="Skrýt" CollapseControlID="txtLabel" ExpandControlID="txtLabel" TextLabelID="txtLabel" CollapsedSize="0" ExpandedSize="0"  />
        </div>

        <asp:Repeater ID="RepeaterThreads" runat="server">
            <HeaderTemplate>
            </HeaderTemplate>
            <ItemTemplate>
                <div class="topic">
                    <span>
                        <%#Eval("Inserted", "{0:d. M. yyyy}")%>
                    </span>
                    <div>
                        <asp:LinkButton ID="LinkButtonThread" runat="server" CommandArgument='<%#Eval("ThreadID")%>' OnClick="LinkbuttonThread_Click"><%#Eval("Title")%></asp:LinkButton>
                        (<%#DateOfLastPost(Container.DataItem)%>)
                    </div>
                </div>
                
            </ItemTemplate>
        </asp:Repeater>
    </asp:Panel>
</asp:Content>
